package com.tanhua.dubbo.server.api;

import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import com.tanhua.dubbo.server.pojo.Log;

/**
 * @Author: JinboYang
 * @Description:
 * @Date: Created in 下午 20:02 2021/1/17
 * @ModifiedBy:
 */
@Service(version = "1.0.0")
public class LogApiImpl implements LogApi{

    @Autowired
    private MongoTemplate mongoTemplate;

    @Override
    public void save(Long id, String requestURI, String annotation) {
        Log log = new Log(id, System.currentTimeMillis(), requestURI, annotation);
        this.mongoTemplate.save(log);
    }
}
